def read_genome(filename=""):
    fp = open(filename)
    lines = fp.readlines()
    return lines[0].replace("\n", "")


def reversing_complement(pattern):
    reference = 'ATCG'
    corresponding = 'TAGC'

    reversed_complement = pattern.translate("".maketrans(reference, corresponding))

    return reversed_complement[::-1]


if __name__ == "__main__":
    pattern = read_genome("dataset_3_2.txt")

    pattern_rc = reversing_complement(pattern)

    # print(pattern)
    print(pattern_rc)